home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 9 / developer source - volume 9.iso / orinf / feb96 / rajaf106.gif < prev    next >
Graphics Interchange Format  |  1998-02-10  |  16KB  |  800x600  |  4-bit (7 colors)
Labels: text | electronics | screenshot | number | software | font | web page | website
OCR: Oracle Objects for OLE Help File Edit Bookmark Help Contents Search Back History Exit Getting Started See Also Oracle Objects for OLE is designed to provide access to the data of an Oracle database using the dynaset object. + The dynaset object is not the topmost object according to the Object Relationship diagram of Oracle Objects for OLE. This means that you must create or instantiate all of the objects a dynaset depends on (client, session, connection, and database) Using OLE Automation When accessing the Oracle Object Server using the OLE Automation interface, you must create each object explicitly (except for the client object, which is always created automatically). The following code fragment demonstrates how to create first all of the objects required by a dynaset and then the dynaset itself. ' Declare variables as OLE Objects. Dim OraSession As Object Dim OraDatabase As Object Dim OraDynaset As Object ' Create the OraSession Object. Notice that this is the 'only object created via the CreateObject method. The ' argument to CreateObject is the name by which the ' OraSession object is known to the OLE system. Set OraSession = CreateObject ("OracleInProcServer . XOraSession") ' Create the OraDatabase Object by opening a ' connection to Oracle. Set OraDatabase = OraSession. OpenDatabase ( "ExampleDb", "scott/tiger", 0&) ' Create the OraDynaset Object. Set OraDynaset = OraDatabase. DbCreateDynaset ("select * from emp", 0%) ' You can now display or manipulate the data in the dynaset ' named ' OraDynaset'.